<template>
  <div class="refundDialog-view">

    <el-dialog
      title="确认退费"
      :visible.sync="dialogVisible"
      width="30%"
      :before-close="handleClose">
      <div>
        <div class="dialog-item price">
          <div class="dialog-title">退费金额：</div>
          <span class="big">¥{{total.toFixed(2)}}</span>
        </div>
        <div class="dialog-item">
          <div class="dialog-title">退款方式：</div>

          <div>
<!--            <el-radio v-model="data.radio" label="1">现金</el-radio>-->
<!--            <el-radio v-model="data.radio" label="2">支付宝</el-radio>-->
<!--            <el-radio v-model="data.radio" label="3">微信</el-radio>-->
<!--            <el-radio v-model="data.radio" label="4">银行卡</el-radio>-->
<!--            <el-radio v-model="data.radio" label="5">其他</el-radio>-->
            <span>现金退款</span>

<!--            <span v-if="payType == 1">现金退款</span>-->
<!--            <span v-else-if="payType == 2">支付宝退款</span>-->
<!--            <span v-else-if="payType == 3">微信退款</span>-->
          </div>

        </div>

        <div class="dialog-item">
          <div class="dialog-title">备注：</div>

          <el-input v-model="data.remark" placeholder="请输入内容"></el-input>

        </div>

      </div>
      <div slot="footer" class="dialog-footer">
        <el-button @click="dialogVisible = false">取 消</el-button>
        <el-button type="primary" @click="confirmClick">确 定</el-button>
      </div>
    </el-dialog>

  </div>
</template>

<script>
    export default {
        name: "refundDialog",
        props:{
            payType:Number,
        },
        data:function () {
            return{
                dialogVisible:false,
                total:0,
                data:{
                    radio:"1",
                    remark:'',
                }
            }
        },
        methods:{
            handleClose:function () {
                this.dialogVisible = false;
            },
            openDialog:function (value) {
                this.total = Number(value);
                this.dialogVisible = true;
            },
            confirmClick:function () {
                this.$emit("refund-confirm",this.data);
                this.dialogVisible = false;
            }
        }
    }
</script>

<style lang="scss">
  @import "@/assets/scss/payOrDrug/refundDialog.scss";
</style>
